package com.wuze.cloud.enums;

import lombok.Getter;


/**
 * @author: wuze
 * @description:
 * @date: 2023/02/19
 */
public enum SysFileTypeEnum {
    DOCUMENT_FILE(0, "文档文件"),

    IMAGE_FILE(1, "图片文件"),

    VIDEO_FILE(2, "视频文件"),

    OTHER_FILE(3, "其他文件"),

    FOLDER_FILE(4,"文件夹");

    @Getter
    private Integer code;

    @Getter
    private String name;

    SysFileTypeEnum(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    public static String TypeOfCode(Integer code) {
        for (SysFileTypeEnum fileTypeEnum : values()) {
            if (fileTypeEnum.code.equals(code)) {
                return fileTypeEnum.name();
            }
        }
        return null;
    }


}
